﻿using DongFangGuoKai.WMSPlatform.Service.CabinetApp.Dto;

namespace DongFangGuoKai.WMSPlatform.Service.CabinetApp
{
    public partial class CabinetService
    {

        public bool CabinetSampleBind(out string msg, CabinetSampleBindDto cabinetSampleBindDto)
        {
            msg = string.Empty;

            //var receivingBill = Context.TReceivingBills.FirstOrDefault(t => t.BillNo == cabinetSampleBindDto.BillNo);
            //if (receivingBill == null)
            //{
            //    msg = $"{cabinetSampleBindDto.BillNo} 委托单不存在";
            //    return false;
            //}
            //var receivingBillDetail = Context.TReceivingBillDetails.FirstOrDefault(t => t.BillId == receivingBill.Id && t.MaterialId == cabinetSampleBindDto.MaterialId);
            //if (receivingBillDetail == null)
            //{
            //    msg = $"{cabinetSampleBindDto.MaterialId} 样品单不存在";
            //    return false; 
            //}





            return true;
        }
    }
}
